* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*    IV: UNEMPLOYMENT AND PARTNER DEMANDS
*    Year x Province x agegr x edlvl 
*		11/26/23
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

use "AdsEmploymentMerged.dta", clear  

* %%%%%%%%%%%% Employment  %%%%%%%%%%%%%%%%%%%
* %%%%%%%%%%%%  Table 5, panel I. %%%%%%%%%%%%%%

estimates clear
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)
estimates store e5
 
esttab e1 e2 e3 e4 e5 

				  
* %%%%%%%%%%%% Lagged Employment %%%%%%%%%%%%%%%%%%%
* %%%%%%%%  Table 5, panel II. %%%%%%%%%
estimates clear
reg anyforeignwanted unempmpct unempmlagp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpct unempmlagp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpct unempmlagp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpct unempmlagp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpct unempmlagp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)
estimates store e5

esttab e1 e2 e3 e4 e5 

		
* %%%%%%%%%%%% Employment Shock %%%%%%%%%%%%%%%%%%%
* %%%%%%%%%%%%  Table 5, panel III. %%%%%%%%%%%%%%%%%%%%	
estimates clear
reg anyforeignwanted devmp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted devmp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted devmp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted devmp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted devmp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)
estimates store e5

esttab e1 e2 e3 e4 e5 


* %%%%%%%%%%%% Predicted Employment %%%%%%%%%%%%%%%%%%%
* %%%%%%%%%%%%  Table 5, panel IV. %%%%%%%%%%%%%%%%%%%%	

estimates clear
reg anyforeignwanted mprede i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)  
 estimates store e1 
 
reg anyagewanted mprede i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)  
estimates store e2 
 
reg anyoccwanted  mprede i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)   
estimates store e3 
 
reg anylookswanted  mprede i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)  
estimates store e4
 
reg anyeducwanted mprede i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)   
estimates store e5

esttab e1 e2 e3 e4 e5 

				  
* %%%%%%%%%%%%%%% Results by Type of Poster %%%%%%%%%%%%%%%
* %%%%%%%%%%%%%%%% Table A5 %%%%%%%%%%%%%%%%%%%%%%

estimates clear
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & adplacedby~="family", vce(cluster double_cluster1) 
 
estimates store e1
 
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & adplacedby=="family", vce(cluster double_cluster1) 
estimates store e2
 
reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & adplacedby~="family", vce(cluster double_cluster1) 
estimates store e3
 
reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & adplacedby=="family", vce(cluster double_cluster1)
estimates store e4

reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & adplacedby~="family", vce(cluster double_cluster1)
estimates store e5
 
reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & adplacedby=="family", vce(cluster double_cluster1)
estimates store e6 

esttab e1 e3 e5 e2 e4 e6

				  





